by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

CentOS 6.2 is used in this article, and the process of rebuilding curl and git is carried out.
The main reason is that the operating system is too old, and I want to directly build the latest version of git from source.
cat /etc/redhat-release
CentOS release 6.2 (Final)

But when executing the following command, an SSL connect error error occurred.
git clone https://github.com/git/git.git

Because of the old version of CentOS, the way the network provides..
yum update -y nss curl
The update method for is invalid,
So.. I re-Build curl myself.
First on another computer, clone, the latest version of curl.
git clone https://github.com/curl/curl

According to its instructions, check the GIT-INFO file, how to compile.
I execute
./buildconf
./configure
make

Just compiled curl smoothly. Then use make install to install directly.
After completion, retry the download of git repo (Note: In fact, you can go to release to download the released version)
[root@myserver src]# git clone https://github.com/git/git.git
Cloning into 'git'...
remote: Counting objects: 247464, done.
remote: Total 247464 (delta 0), reused 0 (delta 0), pack-reused 247463
Receiving objects: 100% (247464/247464), 90.42 MiB | 1.16 MiB/s, done.
Resolving deltas: 100% (182891/182891), done.
Checking connectivity... done.

Shunli cloned the source of git.
Enter the git repo folder.
According to the instructions in README.md, check the INSTALL file and how to install it.
$ make configure ;# as yourself
$ ./configure --prefix=/usr ;# as yourself
$ make all doc ;# as yourself
# make install install-doc install-html; # as root

Sure enough, step-by-step construction guarantees success. But I simply do the following actions. Hit ./configure without setting prefix.
make configure
./configure
make
make install

It's done, but I found that the suspected version is the rc1 version.
[root@myserver git]# which git
/usr/local/bin/git
[root@myserver git]# git --version
git version 2.18.0.rc1

Although it is the RC version, basically there will be no problems, it looks normal..:)
[root@myserver src]# git clone https://github.com/DevinY/dlaravel.git
Cloning into 'dlaravel'...
remote: Counting objects: 1456, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 1456 (delta 27), resumed 42 (delta 16), pack-reused 1398
Receiving objects: 100% (1456/1456), 3.03 MiB | 948.00 KiB/s, done.
Resolving deltas: 100% (866/866), done.

After thinking about it, I rebuilt version 2.17.1 again. This time I went to the release to download it through wget, unzip it and rebuild.

simply use,
./configure
make
make install
The final screen is as follows, and version 2.17.1 is installed.
 rm -f "$execdir/$p" && \
test -z "" && \
ln "$execdir/git-remote-http" "$execdir/$p" 2>/dev/null || \
ln -s "git-remote-http" "$execdir/$p" 2>/dev/null || \
cp "$execdir/git-remote-http" "$execdir/$p" || exit; \
done && \
./check_bindir "z$bindir" "z$execdir" "$bindir/git-add"
[root@myserver git-2.17.1]# which git
/usr/local/bin/git
[root@myserver git-2.17.1]# git --version
git version 2.17.1
[root@myserver git-2.17.1]#
The above is the process of updating git in the old version of CentOS 6.2 this time.
 

Tags: linux

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


linux,raspberry

Install VNC Server on Raspberry Pi

Checklist introduces how to start VNC Server on Raspberry Pi

linux,docker

How to execute X client and X Window in Container (docker gui)

Today I will talk to you about X, not iPhone X, nor X-Men, but X Window System, He is the main graphical interface display component of the current Linux system. Since it is very easy to expand and modularize, it has been used since it was established in 1986. The X Window system adopts the Client/Server architecture, which splits the application program and the display into two. The application program of X Windows is usually called X Client, and the display is the well-known X Server. The X client communicates with the X server through the X protocol (X protocol), which is an asynchronous network communication protocol.

linux

How to install the monitor tool htop on CentOS

Htop is a free (GPL) ncurses-based program monitor tool for Linux. It is similar to top, but allows you to scroll vertically and horizontally, so you can see the full command line running on the system, And you can view them as program trees, select multiple programs and operate them.